package com.yishun.springboot.web;


import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.yishun.springboot.service.GwsElevatorBasicInfoService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

@RestController
@RequestMapping("/gws")
public class GwsElevatorBasicInfoController {

    @Resource
    GwsElevatorBasicInfoService gwsElevatorBasicInfoService;

    @RequestMapping("/addElevatorBasic")
    public String pushElevatorBasic(@RequestParam("projectName") String projectName) {

        JSONObject res = gwsElevatorBasicInfoService.addGwsElevatorBasic(projectName);

        return JSONObject.toJSONString(res, SerializerFeature.WriteMapNullValue);
    }


    @RequestMapping("/addElevatorParam")
    public String pushElevatorParam(@RequestParam("projectName") String projectName) {

        JSONObject res = gwsElevatorBasicInfoService.addGwsElevatorParams(projectName);

        return JSONObject.toJSONString(res, SerializerFeature.WriteMapNullValue);
    }


}

